﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace DoAnMuaChung
{
    public static class NguoiGiupDo
    {
        public static string laySoTu(string str, int NumberOfWords)
        {
            string[] Words = str.Split(' ');
            string _return = string.Empty;

            if (Words.Length <= NumberOfWords)
                _return = str;
            else
            {
                for (int i = 0; i < NumberOfWords; i++)
                    _return += Words.GetValue(i).ToString() + " ";
            }
            return _return.ToString();
        }
    }
}